/**
*   \file   Sphere.h
*   \author Dave Reid
*   \brief  Header file for the Sphere class.
*/
#ifndef __EAGL_SPHERE_H_
#define __EAGL_SPHERE_H_

namespace eagl
{

/**
*   \brief  Class respresenting a Sphere.
*
*   A Sphere consists of only a single property - a radius.
*/
class Sphere
{
public:

    /**
    *   \brief  Default constructor.
    */
    Sphere() : m_radius(1.0f)
    {
    }

    /**
    *   \brief  Copy constructor.
    */
    Sphere(const Sphere &Sphere) : m_radius(Sphere.getRadius()), m_position(Sphere.getPosition())
    {
    }

    /**
    *   \brief             Constructor.
    *   \param radius [in] The radius of the Sphere.
    *   \param pos    [in] The position of the Sphere.
    */
    Sphere(float radius, const vec3 &pos) : m_radius(radius), m_position(pos)
    {
    }

    /**
    *   \brief  Retrieves the radius of the Sphere.
    *   \return The radius of the Sphere.
    */
    float getRadius() const
    {
        return this->m_radius;
    }

    /**
    *   \brief  Sets the radius of the Sphere.
    */
    void setRadius(float radius)
    {
        this->m_radius = radius;
    }

    /**
    *   \brief  Retrieves the position of the Sphere.
    *   \return The position of the Sphere.
    */
    const vec3 & getPosition() const
    {
        return this->m_position;
    }

    /**
    *   \brief          Sets the position of the Sphere.
    *   \param pos [in] The new position of the Sphere.
    */
    void setPosition(const vec3 &pos)
    {
        this->m_position = pos;
    }

private:

    /// The radius of the Sphere.
    float m_radius;

    /// The position of the Sphere.
    vec3 m_position;
};

}

#endif  // __EAGL_SPHERE_H_